//
// Created by PC on 2022/11/8.
//

#include <vector>
#include <iostream>
#include "arrUtil.h"
using namespace std;

int main()
{
    vector<int> arr{9,8,7,6,5,4,3,2,1,0};
    randVector(arr,10);
    printVector(arr);
    for(int i=1;i<arr.size();i++)
    {
        int cur =arr[i];
        int j = i;
        while(cur<arr[j-1] and j>0)
        {
            arr[j] = arr[j-1];
            j--;
        }
        arr[j]=cur;
//        printVector(arr);
    }
    printVector(arr);

}